package cloud.simple.rabbitmq;/**
 * Created by joyu on 2017/8/11.
 */

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;

/**
 * @author joyu
 * @ClassName SinkReceiver
 * @Description 接收来自RabbitMQ消息的消费者
 * @create 2017年08月11日 10:45
 */
// @EnableBinding(Sink.class)
@EnableBinding(value = {Sink.class, SinkSender.class})
public class SinkReceiver {

    private static Logger logger = LoggerFactory.getLogger(SinkReceiver.class);

    @StreamListener(Sink.INPUT)
    public void receive(Object payload) {
        logger.info("Received:" + payload);
    }
}
